<?php
/* $Id: view.announce.php,v 1.2 2003/10/08 07:12:32 tuxmonkey Exp $ */
/**
 * @package Issue-Tracker
 * @subpackage Announcements
 */

if (strpos($_SERVER['PHP_SELF'],basename(__FILE__)) !== false) {
  print "Direct module access forbidden.";exit;}

if (!empty($_GET['aid']) and can_view_announcement($_GET['aid'])) {
	$sql  = "SELECT title,message,posted,userid ";
	$sql .= "FROM announcements ";
	$sql .= "WHERE aid='".$_GET['aid']."'";
  $announcement = $dbi->fetch_row($sql,"array");
  $smarty->assign('announcement',$announcement);
  $smarty->display("announce/view.tpl");
} else {
  redirect("?module=announce");
}
?>
